package com.yoyo.itravel.service;

import com.yoyo.itravel.bean.TravelerInfo;
import com.yoyo.itravel.exceptions.TravellerInfoException;

import java.util.List;

/**
 * @author liuchaojie
 * @version 1.0
 * @Description 常用旅客服务层接口【服务层】
 * @date 2020/6/18 19:17
 */
public interface ITravelerInfoService {
    /**
     * 通过用户id查看常用旅客信息
     * @param userId
     * @return
     */
    List<TravelerInfo> showAllTravelerInfo(String userId) throws TravellerInfoException;

    /**
     * 添加常用旅客信息
     * @param travelerInfo
     */
    int addTraveler(TravelerInfo travelerInfo) throws TravellerInfoException;

    /**
     * 根据常用旅客id修改对应旅客信息
     * @param travelerInfo
     */
    int updateTraveler(TravelerInfo travelerInfo ) throws TravellerInfoException;

    /**
     * 根据常用旅客id删除对应旅客信息
     * @param travelerId
     */
    int deleteTraveler(String travelerId) throws TravellerInfoException;
}
